import axios1 from '@/utils/request'

// mode: cart => obj : cartIds
// mode: buyNow => obj: goodsId,goods.Num,goods,Skiid
export const checkOrder = (mode, obj) => {
  return axios1({
    method: 'GET',
    url: '/checkout/order',
    params: {
      delivery: 10,
      couponId: 0,
      idUsePoints: 0,
      mode: mode,
      shopId: 0,
      ...obj
    }
  })
}
export const submitOrder = (mode, obj, remark) => {
  return axios1({
    method: 'POST',
    url: '/checkout/submit',
    data: {
      delivery: 10,
      couponId: 0,
      idUsePoints: 0,
      mode: mode,
      payType: 10,
      ...obj
    }
  })
}
export const getMyOrderList = (dataType, page) => {
  return axios1.get('/order/list', {
    params: {
      dataType,
      page
    }
  })
}
